﻿using System.ServiceModel;
using Resonance.TrainNode.Contracts.Entities;

namespace Resonance.TrainNode.Contracts.Services
{
	[ServiceContract]
	public interface ITrainNodeService
	{
		[OperationContract]
		void AddNNetToSession(string sessionID, NNet nNetwork);

		[OperationContract]
		void CreateNNet(string sessionID, ActivationFunctionEnum activationFunction, double sigmoidAlpha, string NNetID, int inputNeuronsCount, int[] layersNeuronsCount);

		[OperationContract]
		void AddJobToSession(string sessionID, string jobID, string NNetID, TrainAlgorithmTypeEnum trainAlgorithm, TrainParameters trainParams);

		[OperationContract]
		void AddPatternsToSession(string sessionID, TrainPattern[] patterns);

		[OperationContract]
		void AddSession(string sessionID, string description);

		[OperationContract]
		NNet GetJobTrainResult(string sessionID, string jobID);

		[OperationContract]
		NodeInfo GetNodeInfo();

		[OperationContract]
		TrainSession[] GetSessions();

		[OperationContract]
		TrainSession GetSessionByID(string sessionID);

		[OperationContract]
		TrainJob[] GetSessionJobs(string sessionID);

		[OperationContract]
		void RemoveJobFromSession(string sessionID, string jobID);

		[OperationContract]
		void RemoveSession(string sessionID);

		[OperationContract]
		void RemoveNNetFromSession(string sessionID, string NNetID);

		[OperationContract]
		void SetNodeInfo(string nodeDescription, string nodeUniqueName);

		[OperationContract]
		void StartTrainSession(string sessionID);

		[OperationContract]
		void StopTrainSession(string sessionID);
	}
}
